from flask import jsonify
from routes.user_routes import register_user_routes
from routes.item_routes import register_item_routes
import sys
import os

sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from mock.item_data import register_mock_item_routes

def register_routes(app):
    # 测试路由
    @app.route('/')
    def hello():
        return jsonify({'message': 'Hello, World!'})

    # 注册用户相关路由
    register_user_routes(app)

    # 注册物品相关路由
    register_item_routes(app)

    # 注册模拟物品数据路由
    register_mock_item_routes(app)